-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mobile: Fixes #11028: Accessibility: Fix sidebar broken in right-to-left mode, improve screen reader accessibility #11056
Mobile: Fixes #11028: Accessibility: Fix sidebar broken in right-to-left mode, improve screen reader accessibility #11056
Conversation
@@ -11,7 +11,6 @@ export const DEFAULT_ROUTE = { | |||
const appDefaultState: AppState = { | |||
smartFilterId: undefined, | |||
...defaultState, | |||
sideMenuOpenPercent: 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sideMenuOpenPercent
state was previously unused (only usage commented out).
// Accessibility, keyboard, and touch hidden. | ||
inert={isHidden} | ||
refocusCounter={isHidden ? undefined : 1} | ||
> | ||
<View style={style}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "hide for accessibility" and autofocus logic is now handled by SideMenu.tsx
, so this workaround is no longer necessary.
Summary
This pull request replaces the unmaintained
react-native-side-menu-updated
with a customSideMenu
with a similar implementation: Both use React Native'sAniamted
andPanResponder
.This fixes several issues:
Additionally, it fixes a recent iOS regression:
It should also make the sidebar better at detecting fast open/close gestures.
Resolves #11028.
Resolves #8999.
Screen recordings
Web/Firefox
Screencast.from.2024-09-15.14-16-00.webm
Android 13
No TalkBack:
out.mp4
With TalkBack:
out.mp4
iOS 17 (simulator)
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-09-15.at.14.22.00.mp4
iOS (simulator, reduce motion)
after-pr-ios-ltr-portrait-reduce-motion.mp4
iOS (simulator, right-to-left layout)
Portrait:
after-pr-ios-rtl-portrait.mp4
Landscape:
after-pr-rtl-landscape.mp4
Observe that there are still issues in landscape mode on iOS devices with a notch — the sidemenu can be partially covered by the notch. This, however, seems better than before (see recordings under "Compare with before").
Compare with before
pre-pull-request--ios-rtl.mp4
before-pr-ios-rtl-portrait.mp4
iOS (simulator, VoiceOver enabled)
after-pr-ios-voiceover.mp4